package com.cdu.ai_intelligent_teaching_and_training_system.mapper;

import com.cdu.ai_intelligent_teaching_and_training_system.entity.AssignmentQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AssignmentQuestionMapper {
    
    // 根据作业ID查询所有题目
    List<AssignmentQuestion> selectByAssignmentId(@Param("assignmentId") Integer assignmentId);
    
    // 根据题目ID查询题目
    AssignmentQuestion selectById(@Param("questionId") Integer questionId);
    
    // 插入题目
    int insert(AssignmentQuestion question);
    
    // 更新题目
    int update(AssignmentQuestion question);
    
    // 删除题目
    int deleteById(@Param("questionId") Integer questionId);
    
    // 根据作业ID删除所有题目
    int deleteByAssignmentId(@Param("assignmentId") Integer assignmentId);
} 